package com.service;

import com.dao.OplogDao;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.util.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Slf4j
@Service
public class OplogService {

    @Autowired
    OplogDao oplogDao;

    public AjaxResult list(String mod_name,String begin_date,String end_date, String pageNum, String pageSize) {
        PageHelper.startPage(Integer.valueOf(pageNum), Integer.valueOf(pageSize));
        List<Map<String,Object>> list = oplogDao.list("",mod_name,begin_date,end_date);
        return AjaxResult.getOk(new PageInfo<>(list));
    }

}
